//
// Created by Tony on 2024/5/22.
//

#include "Operator.h"
#include "../../../compiler/Visitor.h"
#include "../../../lexer/token/PunctToken.h"

namespace Parser {

const char* Operator::op() const {
    auto punctToken = static_pointer_cast<Lexer::PunctToken>(token);
    return punctToken->getValue();
}

int32_t Operator::accept(Compiler::Visitor* visitor) { return visitor->visit(this); }

} // namespace Parser
